load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")

package(default_visibility = ["//visibility:public"])

cc_binary(
    name = "libmulti_sensor_fusion_component.so",
    linkshared = True,
    linkstatic = False,
    deps = [":multi_sensor_fusion_component_lib"],
)

cc_library(
    name = "multi_sensor_fusion_component_lib",
    srcs = glob([
        "*.cc",
    ]),
    hdrs = glob([
        "*.h",
    ]),
    deps = [
        "//air_service/modules/perception-fusion/algorithm/interface:multi_sensor_fusion",
        "//air_service/modules/perception-fusion/algorithm/air_fusion:air_object_fusion",
        "//air_service/modules/perception-fusion/proto:msf_config_cc_pb",
        "//air_service/modules/perception-fusion/pipeline/tools:msf_tools",
        "//base/plugin:base_plugin",
        "@protobuf_import//:protobuf_import",
        "@com_github_google_glog//:glog",
        "@fastrtps//:fastrtps",
        "@com_github_gflags_gflags//:gflags",
        "@airosrt//:airosrt",
        "@yaml_cpp//:yaml_cpp",
        "@jsoncpp//:jsoncpp",
        "@opencv//:opencv",
    ],
)


cc_binary(
    name = "libmulti_sensor_fusion_component_viz.so",
    linkshared = True,
    linkstatic = False,
    deps = [":multi_sensor_fusion_component_lib_viz"],
)

cc_library(
    name = "multi_sensor_fusion_component_lib_viz",
    defines = ["MSF_VIZ"],
    srcs = glob([
        "*.cc",
    ]),
    hdrs = glob([
        "*.h",
    ]),
    deps = [
        "//air_service/modules/perception-fusion/visualization:msf_visualization",
        "//air_service/modules/perception-fusion/algorithm/interface:multi_sensor_fusion",
        "//air_service/modules/perception-fusion/algorithm/air_fusion:air_object_fusion",
        "//air_service/modules/perception-fusion/proto:msf_config_cc_pb",
        "//air_service/modules/perception-fusion/pipeline/tools:msf_tools",
        "//base/plugin:base_plugin",
        "@protobuf_import//:protobuf_import",
        "@com_github_google_glog//:glog",
        "@fastrtps//:fastrtps",
        "@com_github_gflags_gflags//:gflags",
        "@airosrt//:airosrt",
        "@yaml_cpp//:yaml_cpp",
        "@jsoncpp//:jsoncpp",
        "@opencv//:opencv",
    ],
)

